<?php
class Foo
{
    public function __construct() {}
    public function foo() {}
    public function helo() {}
}

var_dump(
    is_callable(array('Foo', '__construct')),
    is_callable(array('Foo', 'foo')),
    is_callable(array('Foo', 'helo')),
    is_callable(array('Foo', 'hello'))
);

class callFunc
{
    static function index($func, array $param_arr = [])
    {
        //var_dump(is_callable($func, false, $callable_name), $callable_name);
        //if(is_callable($func)) {
        if (is_array($func) && is_array($func[0])) {
            $func[0] = new $func[0][0]($func[0][1]);
        }
        
        call_user_func_array($func, $param_arr);
        
    }
    
    static function hello() {
        echo 'hello';
    }
}

class queueControl
{
    static function index($data)
    {
        //var_dump(is_callable($func, false, $callable_name), $callable_name);
        //if(is_callable($func)) {
        //$func = $data['func'];
        //$param_arr = $data['param_arr'];
        list($func, $param_arr) = $data;
        if (is_array($func) && is_array($func[0])) {
            $func[0] = new $func[0][0]($func[0][1]);
        }
        
        call_user_func_array($func, $param_arr);
        
    }
    
    static function hello() {
        echo 'hello';
    }
}



function dump($a) {
    var_export($a);
}

class A
{
    static function index()
    {
        echo __CLASS__;
    }
    
    function say()
    {
        echo 'resume';
    }
}

queueControl::index([ [['A'], 'say'], []]);
queueControl::index(['dump', [1]]);
//Y::mq('queueControl', $data, null, 'doNormal');
//callFunc::index('dump', [1]);                   //调用函数
//callFunc::index(array('self', 'hello'), []);    //调用静态方法
callFunc::index(['A', 'index'], []);
callFunc::index('A::index', []);
callFunc::index([['A'], 'say'], []);

$ref = new ReflectionClass('A');
//var_dump($ref->getMethods(), $ref->getProperties());